package com.ovhoo.android.media;

import com.ovhoo.android.fiveexplore.AudioPlayerDialog;

public class AudioPlayerThread extends Thread {
	
	protected AudioPlayerDialog dialog;
	private boolean isRunning = true;
	
	public AudioPlayerThread(AudioPlayerDialog dialog){
		super();
		
		this.dialog = dialog;
	}
	
	
	public void run(){
		while(this.isRunning){

			try {
				if (this.dialog.isPlaying()){
					this.dialog.updatePlayBack();
				}
				else{
					sleep(1000);
				}
				sleep(1000);
			} catch (InterruptedException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
	}
}
